package Factory.AbstractFactory;

public class ClientApp {


    public static void main(String[] args) {
        GUIFactory factory;

        String osName = System.getProperty("os.name").toLowerCase();
        if (osName.contains("windows")){
            factory = new WindowsFactory();
        } else if (osName.contains("mac")) {
            factory = new MacOSFactory();
        }else {
            throw new RuntimeException();
        }

        Button button = factory.createButton();
        button.paint();

        TextBox textBox = factory.createTextBox();
        textBox.render();

    }
}
